package com.joysuch.wwyt.bp.controller;


import cn.hutool.core.date.StopWatch;
import com.joysuch.wwyt.bp.service.BpInvestigateTaskAssignService;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jwk
 * @since 2021-09-16
 */
@Controller
@RequestMapping("/bp/bp-investigate-task-assign")
public class BpInvestigateTaskAssignController {

    @Autowired
    private BpInvestigateTaskAssignService taskAssignService;

    @GetMapping("/clearInvestigateTaskAssignHis")
    @ApiOperation("清除bp_investigate_task_assign_his表数据")
    public ResultBean clearInvestigateTaskAssignHis() {
        taskAssignService.clearInvestigateTaskAssignHis();
        return ResultBean.defaultSuccessResult();
    }

    @GetMapping("/recalculateStatCount")
    public ResultBean recalculateStatCount() {
        taskAssignService.recalculateStatCount(new StopWatch());
        return ResultBean.defaultSuccessResult();
    }

}

